Fix build on FreeBSD