Varying electromagnetic coupling and primordial magnetic fields