Fix MSVC build issues