Fix crash with broken EXIF

http://blog.yawd.eu/2012/fix-sorlthumbnail-engines-pil-orientation-error/