Fix build errors

Two issues:
* Force unicode in java-io.cpp, to fix a build error when cross-compiling
* Fix linux->darwin cross compile