Fix Rails 4 support

In master Rails we need `to_s` for `Rails.version`.