Fix libpng 1.5 support - cast char