Fixes for ruby 2.1.1 (and probably >= 2.0.0)