Fix g_thread_init() and g_type_init() deprecations.