Fix problem for safari private mode

In Safari private mode it appears as though localStorage is available, but trying to call .setItem throws an exception.
I've fixed the support check to also try to write using setItem method.