Fix MSVC build, implement DSO test for Windows