png: improve signature check