Fix bug listening to writes in kqueue.