Avoid setting an incomplete header if scope is nil.

Some application servers expect the hash to be well formed, at least Webrick
and Passenger require this fix to perform correcly.

This is related to #1