cmake: Enable to build Java bindings only