Tiny localStorage module, check and try to use native localStorage api if the browser is supported, otherwise use cookie instead.