Fix Rails generators for Ruby 2.1.x

The errors showed up after running `script/generate migration` as:

    undefined local variable or method `vars' for #<Rails::Generator::Commands::Create:0x007ff06395de80>

The reason for the error is that in recent Ruby versions it seems that
the vars local variable is not accessible in the binding, although it
should be.

I was not able to reproduce the issue outside the context of the Rails
generators' code. However unlikely, it might be the case that something
"smart" from Rails' internals is messing up with the binding and
breaking in recent Rubies.

The respond_to? is there to keep backwards compatibility with older
Rubies, just in case.