Clean up setting of static global vs. local-context variables.
Clean up setting of static global vs. local-context variables.

This makes it work even if variables aren't marked with the const
keyword.

mstorsjo/c99-to-c89,rbultje/c99-to-c89,libav/c99-to-c89,mstorsjo/c99-to-c89,rbultje/c99-to-c89,libav/c99-to-c89