Added partial kqueue support - buggy commit