High energy γ-ray detection with the AMS-02 electromagnetic calorimeter