java: Use option_matches() function in jni.cc

Clean up code in jni.cc to use option_matches() instead of the (broken)
strcmp() comparison.

Signed-off-by: Pekka Enberg <penberg@iki.fi>