Compatibility with ruby 2.2.0