Added and modified darwin.el for macosx