fix signedness check on 32-bit systems