Fix celery issue #1703

The issue: https://github.com/celery/celery/issues/1703

This appears to fix the issue.

This has not been tested on windows, but tests on python2.6/python2.7 on ubuntu 12.04 appear to pass.