Add local storage shim to background context

This fixes a number of issues when installing the extension for the first time.