Make tests work on FreeBSD