Import with_statement from __future__ for Python 2.5.

The if clause is not strictly necessary, but it's good to see why this
is here.