Fix type hinting of Twig engine

Similar to https://github.com/symfony/symfony/issues/4742
Merge pull request #50 from Jeremlicious/master

Fix type hinting of Twig engine