fixed compile errors with latest XCode (AppDelegate window accessor)