An analytical solution for a Stefan problem with variable latent heat