An exact test for population differentiation