Add fixes to stop return of sorted arrays when using unique
Add fix for better MATLAB version checking