Fix for active tab detection in Chrome

Uses Chrome's experimental visibility API to detect inactive tabs.