Which American president committed the United States to a policy of preventing the spread of communism?