libopkg: fix pkg_set_ptr() to properly set NULL pointers