Add g_thread_supported() defined check