Basque referendum plan becomes law, in challenge to Madrid