Tilt 2 compat

Makes Sinatra compatible with Tilt 2. See #746, #875.