The thread_local destruction workaround is needed for gcc too.