This is probably already known, but I'll go ahead and post it. In trying to build against libpng-1.4.0, I had to edit src/_png.cpp:
// png_destroy_read_struct(&png_ptr, &info_ptr, png_infopp_NULL);
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
-Randy