Use new names of system calls. I'm not certain if this will work on other platforms, as I've only compiled this under Windows using VC9.
VC9 compiler warnings fixes
VC9 compiler warnings fixes