Add OS X support

The tests still pass, as far as I can tell.