some win32/msvc fixes