add kqueue support(50%)