msvc build fixes