Chaos in small-amplitude surface gravity waves over slowly varying bathymetry