use our environment in jinja2’s render_t_to_string

`tojson` and `enumerate` are now accessible in jinja templates
rendered with render_template_to_string().

Signed-off-by: Chris “Kwpolska” Warrick <kwpolska@gmail.com>