Check for libpng to assure X11 detection

Based on Homebrew's xquartz.rb.  Improves Yosemite specifically.
Fixes #8483