Clean up a few windows-related details

Consistently use _WIN32 for identifying windows (which is automatically defined by the compiler, instead of relying on defines that are manually set in the project/build files), get rid of non-standard pragmas, clean up whitespace.