fix tests on OS X

thanks to Alexander Poluektov for his machine and time.