fix bug of object save to cookie

if ('object' == typeof val) val = 'j:' + JSON.stringify(val);