Fix compiler error for native serial JNI under Darwin.