Sums of powers of integers and generalized Stirling numbers of the second kind