make PNG and TIFF support optional - closes #1704