Add license in gemspec and Rakefile [backport]

This pull request backports a fix in #361 to the release14 branch.