Enable gem to work with Rails 4.

Rails 4 returns an object when we are using ```Rails.version```.
We will get the string using ```to_s``` and it should do no harm for older versions of rails.