Phase separation in the presence of a surface