Fix broken tests on OS X