adapted to run examples in OSX 10.9
Merge pull request #2 from pinver/fixosx

adapted to run examples in OSX 10.9