Merge pull request #2 from abigagli/master

Some tweaks to build on OS X and Linux