fix: GUI Disappearing #1522 (Mac OSX)

- this solution works stable on mac and ensures that the window get's reopened when the user clicks the dock icon .
- tested on 10.8 with Qt4.8.4 and Qt5.0.1