Make compatible with CRuby 2.1

It is quite safe to assume that for entire 2.x version lifecycle these
  patches would be needed