fix build issues on msvc