On the origin of supergravity boundary terms in the AdS /CFT correspondence