Fixing localStorage function - changing Modernizr