OS X fixes

Addresses #45