Fix plugin_search_path not being set during prepare hook