Adding FreeBSD Platform support, closes #348
Merge branch 'freebsd_fix'