add a MEX file for MBAR