Fix namespace problems

When calling macro REPORT_NOTICE, 'cout', 'endl' and 'findFunctionName'
is not resolved correctly.