Special case p = 8k + 5 in n_sqrtmod.