patch (p1) to fix build with libpng >= 1.4