Behaviour of unique has changed after R2012b. We force the old behaviour to keep compatibility with Octave's implementation of the unique function. Also removed useless condition.