add mex support for linux