Support lambdas directly in RunOnMain