Work with old and new glib

Avoids "deprecated" warnings.
diff --git a/src/test-would-substitute.cc b/src/test-would-substitute.cc
index 6864c22..8ea87cd 100644
--- a/src/test-would-substitute.cc
+++ b/src/test-would-substitute.cc
@@ -32,7 +32,10 @@
 #include "hb-ot.h"
 
 #ifdef HAVE_GLIB
-#include <glib.h>
+# include <glib.h>
+# if !GLIB_CHECK_VERSION (2, 22, 0)
+#  define g_mapped_file_unref g_mapped_file_free
+# endif
 #endif
 #include <stdlib.h>
 #include <stdio.h>
@@ -63,7 +66,7 @@
     GMappedFile *mf = g_mapped_file_new (argv[1], false, NULL);
     font_data = g_mapped_file_get_contents (mf);
     len = g_mapped_file_get_length (mf);
-    destroy = (hb_destroy_func_t) g_mapped_file_free;
+    destroy = (hb_destroy_func_t) g_mapped_file_unref;
     user_data = (void *) mf;
     mm = HB_MEMORY_MODE_READONLY_MAY_MAKE_WRITABLE;
 #else