png2ico: fix build with recent clang

This project seems dead, but several people reported this issue so let's
carry this tiny patch rather than remove it.

Fixes #23497.