Millwall have confirmed the signing of experienced goalkeeper Stephen Bywater on a two-year contract.