Attempt to rewrite namedItem so that it will work in all normal desktop browsers and Safari too