Synchronization of a self-sustained cold-atom oscillator