Only test the distinct case when in Rails 4.0
Rails 4.1 doesn't respond to default_scoped anymore