Fix MSVC compile errors