Refactor: Use GLIB_CHECK_VERSION when deciding what compatability code to include