Handle NSManagedObject subclasses

This seems to do it.

/cc @itsthejb