Measurement of the 8B solar neutrino flux with the KamLAND liquid scintillator detector