How to design birefringent polarizers