Fix checking for JPEG support