What factors shaped American imperialism?