added FreeBSD support