Try to make library compilation more robust on Windows JVM backend.