If Putin is positioning himself as a defender against jihadism it is because the west vacated that role.
Your analogy also falls flat because the West was actively defending against communism in Europe in the 30s. There was not one communist regime in all of Europe outside of the USSR and Stalin retreated into the USSR and lost the ability or will to export the revolution.
You must be familiar with this
Text of the Nazi-Soviet Non-Aggression Pact
http://legacy.fordham.edu/halsall/mod/1939pact.html