Add cookie fallback for localStorage.
Merge pull request #2 from Zmetser/patch-1

Add cookie fallback for localStorage.