added compatibility with latest changes to the chrome API

Update uses of "old" chrome API methods to their newer versions to avoid potential issues with deprecation.