How could I go about converting a string containing an image's mime-type to the file extension associated with it? I don't have the IMAGETYPE_XXX constant for each image that image_type_to_extension() requires so is there a different solution?