Obama pledges to stand by Afghans