fix depreciation warning

hookAddTwigExtension was depreciated in 2.0