build: Fix out-of-tree generation of api_exec_es{1,2}.c