test: add type init compat code for glib < 2.36.0