Fix Firefox-specific behaviour for newest Selenium version.