Measuring the orbital angular momentum spectrum of an electron beam