fixed checks in iOS for support of localStorage and improved the support in general