Fix compatibility issues

Server may return with address type other than the type used during sending.

This bug can be validated using different server implementations.

https://github.com/clowwindy/shadowsocks-nodejs/commit/99c625229a4a50d4b04691c2b4e96a86b11a07ed