Don't call :scoped if it's deprecated.

This avoids a deprecation warning in Rails 4.