Workaround for Mac OS X bug where main window does not appear until dock icon clicked on for 2nd time.