Fix compilation errors and tests to upgrade to elasticsearch 1.3.2
Merge pull request #1 from imdhmd/es-1.3.2

Compatible with elasticsearch 1.3.2