libevent wrapper for lua