Adds compatibility with libpng 1.6.