some cmake fixes wrt msvc