Influence of surface waves on the propagation of a gravity current