Adapt to mgo API.