fixes to compile on win32