moved from https://github.com/ReactiveMongo/ReactiveMongo/pull/182