Replace on_load with instance_eval

Addresses https://github.com/rails/rails/issues/9461
Merge pull request #44 from rubys/rails_issue_9461

Replace on_load with instance_eval