Numerical homogenization and synthesis of wave polarizers through the material-by-design paradigm