Add to_s for Rails.version

Due to rails/rails#8501.