Add backwards compatibility for filter_parameters in Rails 3

Commit e93132c added support for Rails 4, but it broke the automatic
filter_parameters in Rails 3. This adds backwards compatibility for
Rails 3.

Fixes issue #249.