A Unification Algorithm for Second-Order Linear Terms