Environmental stress and local adaptation in Daphnia magna