Hyperfine interactions of muonium and hydrogen in semiconductors: Cluster calculations