Measurement of the dependence of the light yields of linear alkylbenzene-based and EJ-301 scintillators on electron energy