On the synchronization of selfexcited and hidden attractors