feature request: kqueue support

Hi manjuraj,

I've forked Ayutthaya's original changes to support kqueue and modified the code and fixed bugs that I found in my testing. I've also made changes to support compilation on FreeBSD. I would appreciate it if you could take a look at my code and let me know if you would like me to make any changes. Thanks!