Fixes #167

This corrects a behavior change added in Elasticsearch in version 1.4.0, but remains reverse compatible with earlier versions.