France, Spain, Germany, Portugal and Luxembourg have agreed to take some of the 141 migrants on the Aquarius humanitarian ship, the European Commission said on Tuesday.