try to pass sort to cProfile's runctx but revert if not python 2.7