Get modelName from collection when collection uses BaseModel

When model.constructor.id isn't set (such as when a collection uses generic BaseModel), get modelName from model.collection.constructor.id.

Fixes #151