Construction of a smooth Lyapunov function for an asymptotically stable set