The current implementation does not support `ksy` files which have an `import` (e.g. `midas.ksy`). Also fix the multiple definition error for C functions.