OSX support

I think this is stable enough for a release. But don't run the test suite under OSX! (changes will affect your live contacts database; there's no simulator environment for OSX)