librustc: Respect no_mangle attribute on statics.

Fixes #5972.