use getTabForContentWindow from the add-on sdk (based on Eric's commit)