Fix test failure on OS X