Three-body forces in the quark model