Ruby 2.x.x compatibility

Bumped dependency versions. Fixed errors with new versions and made all tests pass.
Tested on 1.9.3-p545, 2.0.0-p451, Ruby 2.1.1