win32 portability fix