Fix flipped images on OS X.