Latest OSX fixes.
Merge pull request #186 from mbaz/Gaston

Latest OSX fixes.