Fix the generation of stringified queries involving MongoDate