t4k_common: make it work with modern libpng