Encode GELF json to proper GELF binary