Added support for localStorage as indexedDB fallback