Register singleton's destruction using std::atexit