Make sure that package.preload exists before calling set_package_preload