fix pngload with libpng >=1.6.11

thaks Lovell