Fixes GH-6: Fixes compatibility issues to work with elasticsearch-1.0.0.