On Windows, use ctypes if pywin32 is not available