move include method from ActionDispatch::MiddlewareStack to array of middlewares

I have a rails 4.1.1 application and integration tests.
And now i decide to update my capybara version to last at this moment (2.4.3)
My tests failed with 
NoMethodError: undefined method `include?' for #<Rails::Configuration::MiddlewareStackProxy:0x00000003218128>
This PR fixes this.