Move compiler pass to the Extension (fix bug when twig is disabled)