The thermal reactivity of HCN and NH3 in interstellar ice analogues