Just an update to this issue.
It seems that even if a mex function looks compiled successfully, but then matlab is not able to recognize it, then it is because some of the library internally were not linked correctly. Weird enough is that no warning message is provided.
It will need further thoughts, but changing the file extension from C to CPP, and thus compiling it by the g++ compiler solved the issue.
Alternatively, you can keep the C extension but make sure that the CLIBS flag in your meshopts.sh file (/Applications/MATLAB_$VERSION$.app/bin) includes -lstdc (and not -lstdc++ as in the original version).
So, apparently there was a wrong setting in the mexopts.sh file.