The chemical potential from computer simulation