Add matrix transpose solution for Python 2