A Zero-crossing Detection Algorithm for Robust Simulation of Hybrid Systems Jumping on Surfaces