Properly initialize NSApplication on Mac OS X

This was previously fixed, but broken again  when we moved main() out
of Core.cpp.

Fixes: bug #514