Fix the build issue related to Macports-installed libpng on Mac

This pull request would not be merged easily, because I created a new submodule pliu6/png.
I need some expert to explain how to merge such kind of pull request. Thanks!