Thickness dependence of spin wave excitations in an artificial square spin ice-like geometry