Ousted Catalan president declares victory following elections