I'd venture to guess that one of those anti-static bags they use for computer parts would work well. Those bags should form a pretty good Faraday cage around the compass and shield it from any outside electric and/or magnetic fields.
_________________________
“Hiking is just walking where it’s okay to pee. Sometimes old people hike by mistake.” — Demitri Martin