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 this to 3.0.x and only change the ```MONGODB_VERSION``` constant .