Only call g_type_init for glib < 2.36.
Use g_list_copy_deep for glib >= 2.34.