[3.0.x] gme: Fix detection of recent gme library versions
Use the existing pkg-config file to detect presence of libgme. This file is already shipped on all known libgme versions (checked back until 0.6.0, which is from 2015).
This also fixes build with recent libgme versions, which added even more dependencies which were missing in the old check, in particular zlib.
zlib is also added as dependency in contribs. Finally, switch to libc++ for mac builds.
Fixes #27262 (closed)