Minimal changes to build with current SDK.