Add support for optional constant term in logreg