Measurement of the liquid argon energy response to nuclear and electronic recoils