How to know the platform in jsb?

How to know the platform,such as android,ios,destop etc?

JSBool js_platform(JSContext *cx, uint32_t argc, jsval *vp)
{
JSString *str = JS_NewStringCopyZ(cx, “mobile”);
jsval out = STRING_TO_JSVAL(str);
JS_SET_RVAL(cx, vp, out);
return JS_TRUE;
}

the function alwarys return mobile…

jsb_sys.js

//
// sys properties
//

var sys = sys || {};

Object.defineProperties(sys,
{
“capabilities” : {
get : function(){
var capabilities = {“opengl”:true};
if( sys.platform == ‘mobile’ ) {
capabilities[“accelerometer”] = true;
capabilities[“touches”] = true;
} else {
// desktop
capabilities[“keyboard”] = true;
capabilities[“mouse”] = true;
}
return capabilities;
},
enumerable : true,
configurable : true
},
“os” : {
get : function(){
return __getOS();
},
enumerable : true,
configurable : true
},
“platform” : {
get : function(){
return __getPlatform();
},
enumerable : true,
configurable : true
},
“version” : {
get : function(){
return __getVersion();
},
enumerable : true,
configurable : true
}

});

// Forces the garbage collector
sys.garbageCollect = function() {
jsc.garbageCollect();
};

// Dumps rooted objects
sys.dumpRoot = function() {
jsc.dumpRoot();
};

// restarts the JS VM
sys.restartVM = function() {
__restartVM();
};