Fix iCCP support

As per the PNG specification, the only supported compression mode is
PNG_COMPRESSION_TYPE_BASE.
Fix cHRM entry in test.sng

Without this, the validations performed by newer libpng will reject
the file due to invalid chromaticities.
Fix some #ifdef's