Add Visual C compatibility

Tested with VC 2003 32 bits. Passes nmake test.