Getting junit output from node-qunit?

I have the following test runner for my node.js application's unit tests using the node wrapper for qunit:

var testrunner = require("qunit");
testrunner.run({
    code: "./lib/application.js",
    tests: ["./lib/test1.js","./lib/test2.js"]
}, function(){
});

This outputs a pretty human-readable report of my unit tests. All seems to be working as planned.

How do I modify the above file to make it output JUnit format? I've been trying to integrate qunit-reporter-junit but everything I try results in errors. Where do I put the code to override QUnit.jUnitReport such that the QUnit object is in scope?