fix suport for libpng 1.6