Javascript API: fixed code generation upon app run in RhoSimulator