glthread: declare marshal and unmarshal functions as non-static