Fixed compilation on Solaris
Fixed event handling when SSL is used with something else then epoll