fix pdf class for PHP 5.3