Convert parent handle to an int before setting environment variable

Should fix Windows Python 2 test failures