A former Russian prime minister has been declared a foreign agent.