Solving mechanical systems with nonholonomic constraints by a Lie-group differential algebraic equations method