Derivation of phase functions from multiply scattered sunlight transmitted through a hazy atmosphere