Fix encodePayloadAsBinary method encodes packets to base64

I believe it should encode to binary.