javascript: use optimizer for tailcalls