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.