Thermal stability of cobalt and nickel silicides in amorphous and crystalline silicon