g.extractheadervars function

Extracts header variables from header object