Improved compatibility with MATLAB 64 bit