validate: fix build with older GLib versions
g_enum_to_string() is only available in newer ones.
Add compatibility workaround for the time being to decouple this from the decision whether to bump the GLib requirement and what to bump it to.
Fixes #45 (closed)
Edited by Tim-Philipp Müller