Guard java-specific swig code with SWIGJAVA.

Without this building just the python bindings will fail.

Signed-off-by: Morgan Deters <mdeters@cs.nyu.edu>