Support for PHPTAL 1.2, closes #1053