better support for plain javascript

Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>