Unity is right: you’ve not declared the explosion variable! You should declare it as a GameObject (to match instantiatedExplosion’s type) and drag your explosion prefab to it at the Inspector:
var explosion: GameObject; // <- drag the explosion prefab here
function OnCollisionEnter( collision : Collision )
...