Measurement of the response of the deuterated scintillators NE 232 and NE 230 to protons and deuterons