MongoDB: Fixes Python 3 compatibility problem.  Closes #328