Check that build exists before calling EmitDeferredLog.
Check that build exists before calling EmitDeferredLog.

Previously, an exception could be thrown before build was defined, and
this would crash without reraising the original exception.

BUG=

Review URL: https://codereview.chromium.org/807543002

sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client