fixed serial port disconnect handling on win32