Fix browser version detection and failing tests