Add build support for OS X

Fixes #3