Get image dimensions without EXIF extension

Use `getimagesize` when `exif_imagetype` doesn't exist.