Modular transformations for tensor categories