Converting `static` globals to the new `const` globals.

Since the semantics of static changed since https://github.com/rust-lang/rust/commit/90d03d792669fed99b659d1efbe835d4b9b8873c,
the old ones have to be replaced by `const` where appropriate.