Adapt for change of ismember in MATLAB R2013a
(cherry picked from commit feb0eb8a11fea4d31517ef9a745206279eee8f60)