Make ‘em sign a treaty giving us the rights to the bases for 100 years.
Wouldn’t matter. The territory/property is theirs, so they can tear up the lease whenever they want.
The only thing that might work would be to permanently sell the US an island, and irrevocably cede sovereignty over it to the US. Even then, there would eventually be pressure to give it back, like we did with the Panama Canal.
Another possibility would be to lease the area, and instead of us building upon the area, have their government pay for building the facilities, which we then lease back. Rig things so that they face unacceptably-high income losses if they ever kick us out.
Is that any different than Gitmo?
The terms of the lease are everything. The Gitmo treaty is surprisingly short — it will fit on a single page, for instance, and allows us lease rights in perpetuity as long as we don’t violate the few terms on it and as long as *both sides* don’t mutually agree to end it.