prevent security exception

in ff with the right settings, ec will throw security exception if trying to access localstorage