I agree that that's the libertarian position, and that it's also true.
A good case can be made that the citizenry would be safer if Muslims were not allowed to immigrate to this country and if non-citizen Muslims already here were deported.
Also true. But at the very least this argument is in tension with libertarianism's indifference to religion. There seem to be two conflicting principles. If Mohammedan immigrants represent a danger to society, then Mohammedanism must represent a danger to society. On what basis then can the government maintain an indifferentist position towards Mohammedanism and all other religions, if one of the legitimate roles of government is to protect the citizenry from threats?
There is a dichotomy between those who are citizens of this society and those who live outside of the borders of the USA. Libertarianism is based on rights and there is no right to immigrate into the USA. However, there is a right for American citizens to remain in this country and practice their religion of choice, so long as they do not harm others.
The USA can exclude Muslim immigrants because, put bluntly, they have no right to be here and no claim to protection under the Constitution.