add kqueue support and xcode project.