A spectral conjugate gradient method for unconstrained optimization