Use mexGetVariablePtr() instead of mexGetVariable(), for a performance gain