Altered mex functions to comply with C90 standard