Add support for replicaset when using mongoose