Adds support for extension preservation.

Waiting for Rails to catch up with the latest Rack (1.6.0.beta) wich already includes this [update](https://github.com/rack/rack/commit/366c1242a227475eb74edfe39e7083569532ea15).