Update gen_javadoc prints to python3 syntax 

I am not a python programmer, but I was having trouble getting opencv to build on arch with python 3.4.  It was the same error as Bug #3768 After a little digging, calling python on gen_javadoc.py was throwing a simple SyntaxError into get_javadoc_errors.log. Updating the print statements allowed me to build it without a problem.