Use localstorage for JS testing for PhantomJS

fix async localstorage test