VS2010 build: Fixed debug build. Moved some windows related defines to preprocessor.