Fix elasticseach http

Fixes elasticsearch plugins for direct HTTP and reverse proxied HTTP/HTTPS on Ruby >= 1.9.2