Fixes to work on win32.