better support for building against libpng 1.6.x  with pkg-config

I have libpng 1.5 installed in /usr/local and 1.6 (required by this code) in a custom /opt location. This fix makes it easier to build against 1.6 without tweaking the makefile by just passing `PKG_CONFIG_PATH=/opt/libpng-1.6/lib/pkgconfig` (on my system).