Start adding support for FreeBSD
Merge branch 'freebsd-support' into custom