from Jashank Jeremy (jashank)
Patch submitted by Jashank Jeremy. This adds support for freebsd7, freebsd8 and freebsd9. Thanks!