added support for kqueue