fix suport for libpng 1.6
Merge remote-tracking branch 'upstream/master'