Added more crossbrowser support

Using localStorage.hasOwnProperty(key) not working in Internet Explorer 8 and below(I think, not sure about version, but in some old IE, maybe IE 7 and below). Changing it to localStorage.getItem(key) !== null fixes issues in old IEs.