build fixes for freebsd