Check for MongoClient and Mongo classes in Connection getters

Supersedes #133.