fixes for win32 build