fixing more compile problems with Java bindings etc