Fix kqueue test on non-Apple BSDs.
Merge pull request #536 from SaberUK/master+fix-kqueue-test

Fix kqueue test on non-Apple BSDs.