Update elasticsearch.py

Get around bug in https://github.com/collectd/collectd/issues/716