Add version check around deprecated g_thread_init() call.

g_thread_init has been deprecated since GLib version 2.32