Hack around a spurious EOF comparison in rawspeed

Hopefully fixes the warning this code is throwing up. The long term idea is to replace this code with some more rawspeed style code.