msvc compile fixes