Workaround to support reading some jpg files
Older versions of gdk-pixbuf incorrectly read metadata for certain jpeg files (often those taken by a phone), preventing the file from loading.
Workaround optimised by Thomas Holder.
Addresses #632 (closed)
(cherry picked from commit a8eda474)