Compatibility improvements for BSD.
Merge pull request #3 from infoforcefeed/master

Compatibility improvements for BSD.