Factorization in the extended Selberg class