Fix FreeBSD in a way that doesn't break other UNIX.