Fail gracefully when localStorage is not available