Path backwards compatibility in version 5.0

Older WebKit browsers using Path instead of Path2D are not detected as supporting Path anymore, with the 5.0 branch.
This backports fixes from the 5.1 branch to make sure both names are supported.