MSVC compiling fixes

Fixes build on MSVC