Tweaks to fix compile errors on Android

As reported by Hideki