nit: can save some bytes:

```
attrs = klass.prototype.attributes;
if (_.isFunction(attrs)) {
  attrs = attrs.apply(this, arguments);
}
```