Fix MSVC compiler errors/warnings.