Add a `compact` option to `make_output`

When set to false, the output does not contain any self-closing
tags, which is useful for HTML output.  The default is true, which
mimics the current behaviour.