Infinite Horizon Problems in the Calculus of Variations