A magnetic field study of two fast-rotating, radio-bright M dwarfs: StKM 1-1262 and V374 Peg