Fix build for FreeBSD