Use the predefined _WIN32 instead of the manually defined WIN32 for windows specific code

This avoids having to rely on manually defining WIN32 in the build
system.
Merge pull request #799 from mstorsjo/use-predefined-define

Use the predefined _WIN32 instead of the manually defined WIN32 for windows specific code