From what I know the big thing is to keep it away from magnets such as on speakers. Having it stored near iron-containing materials isn't desirable, but I don't think it will damage it much.
Ironically batteries don't seem to have all that much influence on compass. They are "chemical packs" and only influence the compass because of the metal in the container/electrodes.