plug-ins: Fix build with libpng versions < 1.4.

This was broken in 7c493f76f836095adad08205fdfd4522e05e0bd4.