Fix #662 - Check that localStorage is actually supported