Fix problem with building kernel and undefined environment variables

	* build-kernel.sh: Move use of all relevant env variables to after
	define-release.sh.