Make build system for MEX files compatible with future automake versions
In future versions of automake, the subdir-objects
option will be activated by default. This option breaks the way we build the MEX files. We need to redesign the build system for MEX files, or find a workaround.