Add support for FreeBSD.

I added elif sections for FreeBSD to the two platform specific code sections. This was tested with FreeBSD 9.2-RELEASE and Python 2.7, but should work for other versions as well.