Added preliminary OSX support.