Acting Pentagon chief visits Afghanistan