JS codegen: supports more builtins