O-minimal hybrid systems