Fixing OS X specific issues.
Merge pull request #1 from jagill/osx

Fixing OS X specific issues.