Measurement of forward W and Z boson production in $pp$ collisions at $ \sqrts=8 $ TeV