Correcting sample selection bias in maximum entropy density estimation