Allow Rails 4
Only use `attr_accessible` if protected_attributes is defined.

Inspired by PaperTrail.