Solution of boundary-value problems by orthogonal collocation