faking __cxa_thread_atexit_impl