Use reflection to avoid the "not part of JDK" error running tests.