Manually adding delegate for main window and main menu, trying to fix problems in running on OSX 10.7.x