Smooth approximation of patchy Lyapunov functions for switched systems