Make build on osx easier
Merge pull request #177 from catap/master

Make build on osx easier (also tested on linux and cygwin)