Fix g.t for glib 2.59
This MR is meant to supersede !1 (closed), by improving the fix from that other MR so we check the version of GLib we actually care about here, i.e. the one that's being used while testing, instead of the one we were compiled against.