Made g_profile_mutex a GMutex* instead of G_LOCK_DEFINE_STATIC to avoid