Add ActiveRecord::Base#safe_serialize_attributes