Partially revert “libpng fix.”

May be this works with libpng 1.5x, but with 1.2 (the one provided by
Ubuntu) I get “invalid chunk type” error with any PNG file I try.

This reverts commit 70b315ae138f7a023943e77678475249313db6a3.