C++: Record macro uses in #if defined(MACRO)

Change-Id: I4d99053f540073483c16ce842426bf8cd3def421
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>