Don't use list comprehension for header dictionary

The header parser creates a dictionary with different header fields in
it. This used an approach that is not compatible with Python 2.6.
Rewrite it using a different approach that is compatible with Python
2.6, and that is also shorter and somewhat easier to read.

Signed-off-by: Marcus Karlsson <mk@acc.umu.se>