fix (almost) the win32 build