Added hooks for matlab mex file build