fix for faraday 0.9

Faraday.register_middleware is removed in faraday 0.9