png: Use libpng's arguments to select which libraries to build
libpng uses non-standard cmake arguments to build shared or static libraries (or both). Select the correct one based on BUILD_SHARED_LIBS.
libpng uses non-standard cmake arguments to build shared or static libraries (or both). Select the correct one based on BUILD_SHARED_LIBS.