Initial checkin of a native Mac OS X port, sharing most of its code