Fix FreeBSD compilation