Republic of Ireland defender John O'Shea has withdrawn from the squad to face Spain in New York on Tuesday.