Rename __sync implementation

The C++ api is using some of these names, creating strange compiler
errors.