Fix build failures with openjdk-21
The class ThriftyList implements both java.util.Deque and java.util.List. In Java 21, these classes define a reversed() method returning a object of their own type. This makes them incompatible in Java 21. This problem still exists in the upstream project. Hence, this commit proposes compiling the package at the JDK 17 API level to work around the problem until a better solution is figured out upstream.