Remove Python 2.4-incompatible 'with' statement
Merge pull request #5045 from junegunn/wait_for-python2.4

Remove Python 2.4-incompatible 'with' statement