Routes to cubic ice through heterogeneous nucleation