fix: correctly translate flags in Libevent.loop