dev: don't barf if .git is missing

Ensure die() is defined before calling it, by loading build_lib.sh
earlier.
Merge pull request #1722 from aspiers/fix/dev-.git-missing

dev: don't barf if .git is missing