An explicit solution with correctors for variable depth KdV and Camassa–Holm-like equations