St Johnstone midfielders Gary McDonald and Scott Brown have signed new contracts to stay at the club until 2015.