WINDOWS: fix win32 build and tests