Modify print calls to prepare compatibility with Python 3.