A generalization of Duhamel’s principle for differential equations of fractional order