Linearization of matrix polynomials expressed in polynomial bases