The electromagnetic ion beam instability upstream of the Earth's bow shock