Circumventing a Java Windows API problem.

As per http://bugs.java.com/view_bug.do?bug_id=6511002