Losslessly fix JPEG orientation