[FreeBSD]: fixes for freebsd