Kirchhoff's law for arbitrarily polarized light