added FreeBSD support
FreeBSD compat