Only call close on transport if transport is available

`req.transport` is only available in Node < 0.7.