Update tab detach kludge logic to work with Firefox 20

This regression was reported by a user using Firefox 20 but it's probable
the problem started in an earlier version.

Fixes #78.