Some test fixes for freebsd