Surface stress in the self-assembly of alkanethiols on gold