Fix build for glib < 2.28