I think this problem has been laid out by W from just after 9/11. In my understanding, al Queida is more like an A&W Root Beer franchise than a government. al Queida isn't "a foreign government, or any component thereof," but was being harbored and supported by several, two of which have been reconstituted. al Queida would seem to fit inder 1801(a)(4), 1801(b)(1 and 2).
It all depends on what you mean by government. (Forgive me while I wax Clintonesque.)
The Barbary Pirates weren't a government. They were more like your franchise example, and our President used his war powers in that situation.
http://memory.loc.gov/ammem/collections/jefferson_papers/mtjprece.html