Measurement of J/ψ production in association with a W ± boson with pp data at 8 TeV