Motherwell have signed Scotland international defender Stephen McManus on a one-year-contract, following the expiration of his Middlesbrough deal.