MEX compilation for Linux and Windows