Fix compile warnings on FreeBSD.