Support building on OSX

Fixes #16