Fix tests on Mac OSX.