libtar: Add const qualifiers to reduce compile warnings

Change-Id: I06ffeeba81cccd5b4c39c9d131de73311931c416