GD library availability check should look for imagepng function (which is required), not imagejpeg (which is optional). Related to issue #1337366.