Fix bug copyPixelsToBuffer for Android 4.2