Global environmental cost of using rare earth elements in green energy technologies