Switch to using png_jmpbuf to support older libpng versions.

Recent libpng has png_jmpbuf `#define`d to a call to `png_set_longjmp_fn`, but
this function did not exist in 1.2.x. This has a side effect of cleaning up
the shim code a bit.

We need libpng 1.2 support because Centos6 (used by Moz RelEng) only has 1.2.
Merge pull request #1 from metajack/older-libpng

Switch to using png_jmpbuf to support older libpng versions.