build fixes for msvc