Measurement of B (J /ψ →η′e+e-) and search for a dark photon