Fix Behat window switching in chrome

Workaround only, see https://groups.google.com/forum/#!topic/behat/QNhOuGHKEWI
Merge remote-tracking branch 'upstream/3.0' into 3.0
Fixed merge error - tab state is a core customization

Only applied to Putman branch and 3.1. When merging in 3.0,
the JS somehow got broken - this little check fixes it for the time being.