Support new browsers

Cherry-pick from #50, adds a few needs fixes for that PR.