Patch for compilation on msvc

I applied the clang compile fixes. You should send the llvm patch and
all the project file fixes to llvmdev; I don't know who maintains the
project files.

Not sure how useful clang will be without having mingw/cygwin around,
but feel free to ask if you run into issues.