Merge from vendor branch LIBEVENT: