fix CMake build on Mac OSX
fix a potential bug in CProfileNode destructor, if the SDK is included/used multiple times.
work-around what appears to be a bug in Clang 3.4. Todo: create a small repro case for Clang/LLVM or see if they already fixed it.