Measurement of cosmic-ray proton and helium spectra during the 1987 solar minimum