Use exception chaining if PHP 5.3 is available.

See [PEAR Bug 18574](https://pear.php.net/bugs/18574).