Easy: Give them the choice to declare their allegiance: The US Constitution or islamic law. If they choose the latter, kick them the hell out of the country. If they support islamism, no matter their allegiance, kick them out of the country. If they threaten to kill us, kill them first. Pretty basic stuff.
I wonder why Israel doesn't use that same test given the fact that 16% of their population is comprised of Arab muslims.