Scalar field Green functions on causal sets