If one has a malformed image with GPSAltitude key present, but is not rational,
an attempt to convert it to rational will cause a crash. Same with GPSAltitudeRef key,
(which is supposed to be a byte).
This fixes regression introduced in D16617: fix extraction of GPS altitude for exif data / D18010: Fix failing test of exiv gps data