bugfix mahalanobis distance calculator (inverse matrix; works with R
3.x)