Temperature dependence of Sm valence in SmB6 studied by X-ray absorption spectroscopy