I'm not the original poster, but I don't think he or she was equating the Barbary coast countries as being terrorists. Rather that people would be surprised to find out that the USA has been at war off and on with Islamic Caliphates since just after the Revolutionary war.
I think their point is broader than just being generic attack against Islam though, for example there are plenty of Hindu nationalists and Christian Nationalists (Google State Representative Matt Shea in the Washington State) that would love to establish a Hindu or Christian nation by force.
I mean is it, or maybe you thought I meant a Hindu Nation in the US? There have been many incidents reported in the US and world news about the rise of Hindu nationalism and its antagonism towards the 20% Muslim population, here's an example.
I think their point is broader than just being generic attack against Islam though, for example there are plenty of Hindu nationalists and Christian Nationalists (Google State Representative Matt Shea in the Washington State) that would love to establish a Hindu or Christian nation by force.