Fix for encoding errors when building Java source

The generated OpenCV Java source can contain characters outside of ASCII on some systems – this patch allows the ant task to compile them.
(cherry picked from commit f3ee55e04222deea30ffe4e89456c220bc75ff1a)
Merge pull request #718 from apavlenko:java_tests_fix