Create language-specific objects in restoreAPIClone

We need to create code language-specific objects instead of vanilla JavaScript objects in protectAPI.restoreAPIClone()