Update lib/cocoon.rb

Rails 4 compatibility