Fix FreeBSD build