Under Article III, Section 3, of the US Constitution, any person who levies war against the United States or adheres to its enemies by giving them Aid and Comfort has committed treason within the meaning of the Constitution. The term aid and comfort refers to any act that manifests a betrayal of allegiance to the United States, such as furnishing enemies with arms, troops, transportation, shelter, or classified information. If a subversive act has any tendency to weaken the power of the United States to attack or resist its enemies, aid and comfort has been given.
Hence Jefferson's action despite the lack of a formal declaration against the Barbary pirates. Rather appropriate citation in this case, don't you think?