respect rootdir in pkg_register_shlibs

pkg_register_shlibs is only called from pkg_create_from_dir. since
pkg_create_from_dir accepts a root parameter it seem logical to
repect it while registering shared libs.