Fix build in MSVC after merges

I've added some more fixes to the build system.