more fixes for win32 build