Smart pointer for user-toggle enabled C++ external libraries (plugins)