Higher moments of the pion multiplicity distribution in proton-proton interactions at 12 and 24 GeV/c