Fix a cast in JniEnv::NewDirectByteBuffer.

Change-Id: I8692b31c6ce64efc68124df02117b6e4529dfe98