As @Scortchi notes, you can also use orthogonal polynomials. Here is a quick demonstration in R:
set.seed(3406)
N = 50
real.x = runif(N, 0, 10)
ord.x = cut(real.x, breaks=c(0,2,4,6,8,10), labels=FALSE)
ord.x = factor(ord.x, levels=1:5, ordered=TRUE)
lo.lin = -3 + .5*real.x
p.lin = exp(lo.lin)/(1 + exp(lo.lin))
y.lin = rbinom(N, 1, prob=p.lin)
mod.lin = glm(y.lin~ordlin ~ ord.x, family=binomial)
summary(mod.lin)
# ...
# Coefficients:
# Estimate Std. Error z value Pr(>|z|)
# (Intercept) 0.05754 0.36635 0.157 0.87520
# ord.x.L 2.94083 0.90304 3.257 0.00113 **
# ord.x.Q 0.94049 0.85724 1.097 0.27260
# ord.x.C -0.67049 0.77171 -0.869 0.38494
# ord.x^4 -0.09155 0.73376 -0.125 0.90071
# ...