Change kqueue1() to be compatible with NetBSD
(cherry picked from commit 54579376c05e7a039cde5f424c641fa29348835f)