file-jpeg: Reduce use of #ifdefs