Fix to be compatible with Ruby >= 2.0.0