MessageFormatter: fix const correctness