Fixes wrap calls with old mongodb version.