gmon: improve mcount overflow handling [BZ# 27576]