add const to the fourth parameter of mexFunction