fix compile bug on nexus 4
Various changes for nexus 4 support