Improvements to serial connectivity on Windows