ensure storage is writable when setting support flag. fixes #6755

Check we can access storage by writing then removing a test value. This is similar to modernizr's check: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/storage/localstorage.js#L41