Definition and measurement of the local density of electromagnetic states close to an interface