Use _WIN32 instead of WIN32 preprocessor directive and fix warnings