Work around compiler signed <-> unsigned casting issues.