EU and Japan finalize terms for giant free trade deal