Update to work with Manifest Version 2.

These changes simply make it compatible with the new Manifest version 2 extension API.