Bug 874152 - Fix regression that removed `addon` global.

- Write tests to catch such regressions in a future.

Regression was caused by https://github.com/mozilla/addon-sdk/commit/5536d4235df0779349f1a19065b00775aeb38573