Fix compatibility with Python 3.x

In Python 3 `print` is no longer a statement