Fix NameError Mime::JS in Rails 5.1.0 beta
Fix NameError Mime::JS in Rails 5.1.0 beta

* ::Mime::JS is deprecated in Rails 5.0.x and removed in 5.1.0 beta.
  Instead of using ::Mime::JS, ::Mime[:js] is recommended. So I use this.
* But in Rails 2.3, ::Mime[] is not defined and raise NoMethodError.
  So I check that ::Mime[] is defined using respond_to?, and if not
  defined, then use ::Mime::JS.

bonekost/wicked_pdf,mileszs/wicked_pdf