win32: fixes for win64