Resolved nuclear hyperfine structure of muonium centres in CuCl and GaAs by means of the avoided-level-crossing technique