The Breuil-Mézard conjecture when l is not equal to p