Added java source compatibility, and fixed ar command for mingw builds.