Improve serial port guessing logic