libgimpbase: fix crash in gimp_metadata_get_resolution()