'cgi' is not defined in templates, see bug 913364