Add FreeBSD Support

This work gets the bare minimum code working on FreeBSD.  Catalogs compile, 
Note: variable name change here.  I have no idea what the output of kernelversion is on joyent, but it seems like this should actually be kernel.