Is there a way for a program to know if it's executed under the simulator and not on an actual CPU?
You just build a special version of the program tailored to working on the simulator, and that's that.
I have to agree with that. It's probably an error on his part and likely to be a one off.