Graeme Smith has been included in South Africa's Test and one-day squads to face Pakistan next month despite concerns over his fitness.