Add workaround for outdated localstorage implementations