President Obama and his advisers have struggled to strike the right tone , carefully calibrating positive messages about the protests in an effort to avoid giving the government in Tehran an excuse to portray the demonstrators as pro-American .