Homoclinic bifurcations in slow-fast second order systems