Fix tests
Add options for wrapping the JSON output in a Node.js export definition or AMD definition.