c++: replace calls to 1.6 compat macros to calls to 1.8 api