[runtime] Fix a loader leak in the aot compiler.