Fixing compilation errors for win32.
Merge pull request #2206 from dumganhar/master

Fixing compilation errors for win32.