Error handling for event_base_new and evdns_base_new