Some fix to be compilable from fresh Android 4.1.1_r6 source
+ some cosmetics change