Update TruncateTwigExtension.php

Based on requests by jbueler