Fix FreeBSD build issues.