check that window.localStorage exists

IE will be the death of me