fix compilation on FreeBSD