fix QtSerialPort bug to avoid the program from crashing in Yosemite