Work around a 10.10 toolchain bug related to NSApp setDelegate.
NSApp is meant to be a shorthand for [NSApplication sharedApplication],
however there seems to have been a change causing the [NSApp setDelegate]
prototype to differ.  Use sharedApplication instead of NSApp here.