Afghan president moves acting defence minister to head spy agency