compile on mac os X
better fix for OSX
Merge pull request #12 from akhenakh/master

Compile on OSX