Work around "template" changes in parse5 >= 1.2.0

parse5 >= 1.2.0 has made changes to support the template element spec

https://html.spec.whatwg.org/multipage/scripting.html#the-template-element