A measurement of the electron neutrino component of the T2K beam using the near detector