php 5.4 fixes

Fixes required NULL value in imagejpeg() function.