Fix test failure on Mac OSX