Fix passing the protocol module unload function to std::shared_ptr