Fix segfault at end of simulation.

Happens when msg_global is NULL, and only with MSG_USE_DEPECATED.
(cherry picked from commit 5f027eea5a8e54151f990b1329b18caa491710a3)

Conflicts:
	src/msg/msg_host.c (change "priv" to "host")