[FreeBSD]: fixes for FreeBSD

Fixed build on FreeBSD.