In the US, this would be unconstitutional as it limits free speech. The laws you refer to make it illegal to take part in boycotts of the country, not to advocate them. An American can say 'boycott America'. An Israeli can't say 'boycott parts of occupied territory that aren't even in Israel'.
Bomb in Lebanon targets bus heading to Syria, no casualties (Reuters)
from the article: The boycott law is unconstitutional and undemocratic