Fix compile warning about comparing signed and unsigned values.

Reported by Jens Pomoell.