Fix HTMLLegendElement for FF21

In FF21 legend uses the old XPCOM binding which has issues that changing
window.HTLMElement changes any sub class that has HTMLElement in its prototype
chain. We therefore need to ensure that we do not override HTMLElement before
overriding HTMLLegendElement.
Merge pull request #151 from arv/fix-ff-21-ordering-issue

Fix HTMLLegendElement for FF21