Operation of spark chambers in high magnetic fields