Set Commit ID for build scripts

Fixes #806. Exposes commit ID for build scripts as the environment variable "SCM_COMMIT_ID".