Prefer to SHA1 other than MD5 in third-party downloads

If CMake version is less than 2.8.11, fallback to MD5
Merge pull request #1414 from xu-cheng/sha1_md5

Prefer to SHA1 other than MD5 in third-party downloads