cplus version of DOM: fix global #ifdef