Fix test portability problem on OSX.