Try to add support of libevent 1.4.*
Merge github.com:vysheng/tg