Adding build fixes for FreeBSD.