Changes required to make Diamond compile on OS X Mavericks.