fixed compile errors on Windows 7 64 bit