Workaround broken QSslSocket::canReadLine()
canReadLine() doesn't seem to work correctly for unencrypted connections. So let's use bytesAvailable() instead.