Generalized gradient approximation for solids and their surfaces