Fixes for compilation with MSVC.