Fixed compiler errors on MSVC.