Changes to be able to build ng and v1.

Change-Id: I0eea1b207cd48f0c3cb9567c89148dc6435b1f49