St Johnstone have signed former Kilmarnock, Motherwell and Hibernian player Tim Clancy in a bid to solve their defensive injury crisis.