Why not use: x = !x;?

Related discussion:

The first production release with CHANGE was ArduinoCore-API 1.1.0:
https://github.com/arduino/ArduinoCore-API/commit/445594a6107b4f201675338221fb704d7638a863

So you can use the ARDUINO_API_VERSION macro for this purpose:
https://github.com/arduino/ArduinoCore-API/blob/1.1.0/api/ArduinoAPI.h#L24

#if !defined(ARDUINO_API_VERSION) || ARDUINO_API_VERSION < 10100
// handle absence of CHANGE
#endif