fix MSVC build errors