Fixes 2.x compatibility by avoiding unicode in transport.write