fix for Mojolicious 4.0, which has no has_leftovers method anymore