Fix exceptions in OS X test suite