What drives innovation? Evidence from economic history