patch to use system's libpng when enabled by the CMake option USE_SYSTEM_LIBPNG