test: use g_pattern_spec_match_string if available
g_pattern_spec_match_string
was introduced in glib 2.70 to replace
g_pattern_match_string
which is deprecated in glib 2.70 and later.
Alternative to !18 (closed), avoiding breaking builds on systems not yet updated to glib 2.70.