Fix build breakage on FreeBSD