Correct cherry-pick from active_support

uninitialized constant ActiveSupport::Autoload (NameError), sometimes,
at ramdom
https://github.com/rails/rails/issues/14664
Merge pull request #40 from sanemat/feature/correct-way-pick-core-ext

Correct cherry-pick from active_support