Fix PING/PONG

The example program connects to freenode, which doesn't seem to  send PINGs automatically on connection. With other networks, e.g. espernet, this does happen, and an error was produced due to the incorrectly formatted PONG response. I'm still not sure if this is completely right, however it seems to work better than before.