Fix generation of invalid Unicode escape sequences in Java code (fixes #164)