Add check for MongoDB server version

check mongodb version used to be part of 2.x, bringing back to 3.x
[Fixes #2906]

I would also backport https://github.com/mongoid/mongoid/commit/12b39f32e227388b77e66b62e101890ccfff0d14 to 3.0.x.