Hack added to make Rails 4 work with JRuby