Avoid undefined behavior in signed integer negation. Patch by Ahmed Charles.