Windows serial: Add error handling, fix usage of accept().