build fixes, add support for new features

Change-Id: I68b8003306280babd2cc00b29bcce2f98b105c9f