SERVER-8823: make printjson() and printjsononeline() available to  and MapReduce
SERVER-8771 Additional fix for mongostat --discover with mongos