Fixes for building under AOSP.