Support building with MSVC via the makefiles by doing "make UNAME=msvc"

This supports both 32 and 64 bit builds, and ARM builds for windows phone (untested so far but at least builds just fine).

The last two commits of the branch are a bit hacky but are included for now to fix building and to make the built .exe actually work.