Long-term stabilization of the length of an optical reference cavity