Get rid of some deprecated function usage.
Also make Xcode generate an application archive.