Fix tests in latest firefox

`endsWith` is actually provided in the latest firefox