Fixes for building with MSVC.