Fixes for old libevent