Ensure @timestamp is always encoded correctly

A better (hopefully) alternative for elasticsearch/logstash#1145.