changes to run under FreeBSD
Merge branch 'freebsd'