Fix test for JDK 1.6, where methods Statement.closeOnCompletion() and .isCloseOnCompletion() do not exist.