I have Gentoo too: there is an easy fix!
Gentoo provides slots for having multiple versions of a package installed at once. I assume the libpng you have at the moment is version 1.5.x - an up-to-date version. To get the old one (1.2.x), type
sudo emerge libpng:1.2
Customer support service by UserEcho