Active minimization of non-common path aberrations in long-exposure imaging of exoplanetary systems