update to support current Twig

Your version doesn't work with current Twig, this commit fix that