Fixed race conditional deadlock.

GitHub issue: https://github.com/dmatveev/libinotify-kqueue/issues/6