Thats actually wrong their chief.
Many of the first Soclialist theorists were from exploiter nations and saw the nationalism which encompassed their empires degenerate into jingoism.
How ever many Revolutionary thinkers from the oppressed and exploited nations took a different trail of thought to Nationalsim.
A Mr James Connolly included.
Nationalism can be harnessed for Revolutionary movements in oppressed countrys.
It can be utilised to throw off the shackles of imperialism.
Such an exploitation of Nationalism can be seen in Cuba.
Castro's Revolution had a inherently Nationalist feel to it, coupled with Socialism of course.
One of Castro's idols was actually the nationalist freedom fighter Marti, who inspired Castro.