Geometrical effect on the measurement of stopping power: Angle-dependent energy loss of 7-MeV protons in metallic and organic thin foils