Test for Windows correctly on JRuby. Fixes #773.