Pakistan's ex-Premier Imran Khan granted bail in state secrets case