Some minor fixes and tweaks to allow compilation under Visual C++ 12. This doesn't include changes that I need to make to the build generation.