[jit] Implement the delegate ctor optimization in AOT mode too.