Split language detector into library and executable