Partial commit.
Fixing FreeBSD support.