Fix tests on FreeBSD