Add #ifdef to include correct headers on BSD systems

Free/Net/OpenBSD have another names for libevent2 headers. Include them conditionally.