£500 million EU funding agreed for N Ireland