fix building with PLUGIN_LINKING=static