Update mainwindow.cpp

Conditional for mac osx 10.8 serial port discovery