Some more MSVC fixes, compiles now in MSVC