Fixed setImageCompression for PHP newer than 5.1