I'll convert my commentmy comment to an answer and suggest this:
Add the entire text of the license to your software, formatted like a comment (or as a separate file). This is essentially foolproof. Longer licenses would take up more space, but this should not be a problem. Licenses such as the MIT license, which are quite short, should be easy to fit in. As Zizouz212 mentionedZizouz212 mentioned, though, be sure to indicate that this is the text of the last updated version, in order to account for changes.