Fix build with Python 3
Obtained from: https://github.com/sumerc/yappi/commit/778829f6f77928e4292e6a7dd4dfecf501f9a362