Add basic FreeBSD support

I took a look at FineDB and noticed missing FreeBSD support. This pull request implements the minor changes required to compile FineDB on FreeBSD.