Visual Studio 2012 CTP fcompiling fixes

The only thing I'm in doubt is  the following:

+#if defined(WIN32)

don't know if its the right way to check if I'm compiling on windows :)