Pakistan has right to defend itself from terrorism: US