Portable way of loading/unloading a C++ plugin