Improve win32 compatibility