Added support for new version of event machine

Support for ruby 2.0 and 1.0.x of event machine