Simplify a logical XOR