Moon and Sun shadowing effect in the MACRO detector