Statically resolve variable references

Fixes watcher in https://github.com/nathan/phosphorus/issues/122