Zend 1.12 compatibility updates

These changes should be backwards compatible to the shipped version of Zend 1.10.