Fixed Index.retrieve so that it works with ES 1.0.0 and previous versions
Fixes for jruby and rails 4