you don't need to do this.
you can use msxml3 on windows 8

note that what you are doing here is create an exe that is conditional on the _WIN32_WINNT define.
This does not in any way or form make an exe that will run differently depending on what OS the exe is running on.

With 2 separate compiles and 2 separate exe's, you can make an exe that is "meant for win7" and another that is "meant for Win8" but unless you have actual provisions for it, either exe will run on either OS, in so far as the used dll's and imported functions are present. If they aren't you will get a rather cryptic message stating that a certain function from a certain (system) dll cannot be found.

There is also no relation to the build machine. you can build windows 8 binaries on an older windows machine and vice verse in so far as you have installed the platform SDK's, running/debugging the exe is another matter of course.