<theory type="from a non-programming guy on a team whose robot was sensor-free">
Perhaps you could mount another sensor, pointed somewhere that you know won't experience IR, and use that as a baseline?
</theory>
Just the only thing I could think of--if I'm wrong, don't shoot me. (If I'm right, the tip jar is at the door.

)