Generation of magnetic fields by shear-flow instability in pair plasmas