Port the image.platform lookup from 3.4, refactored a bit for good measure.  GUI-195