A boundary element method for three-dimensional free surface flow