Support mimetype in render and render-template