Use iceConnectionState to detect initial connection.

Issue #433
(unless you've pushed the change upstream and this is just a mirror of the upstream version)