Algebraic modular forms on definite orthogonal groups