On the use of Green's functions for solving melting or solidification problems