Compiler warning fixes.

g_thread_init is automatically called since 2.32 and deprecated since
2.35. g_type_init is automatically called since 2.36 and will be
deprecated in the future.