Integrability of geometric structures with respect to a Lie algebra