Fix working on OSX and fatal error on unknown OS
Merge pull request #1 from gregurco/master

Fix working on OSX and fatal error on unknown OS