Allow both model selection and likelihood threshold classification.
Fix build with newer automake.
Correctly detect threshold mode. Use log likelihood threshold.