Build fixes:

- Link dlfcn library.
- Link the mjs logic library statically
- Stricter error checking and ignore specific case.
- Ignore build-aux folder.