fix false positive: "function 'bar' could be declared as const" when class is declared as friend before

Fixes issue #24.