loadJPEG: fix fread() return value testing

According to the fread() manpage, successful fread() call will return 1 and not len in this case.
Merge pull request #290 from phorque/patch-2

loadJPEG: fix fread() return value testing