Applied fix for Android 4.2 based on koush's patch

Applied the patch based on the gist published by koush:

https://gist.github.com/4083403