configure.in Makefile.am: Skip tests/ directory if libpng was disabled. (#3423, reported by Steve Chaplin)