THRIFT-2843:Fixes typo in Automake configuration for checking java variable

The current code is checking that $JAVAC is defined twice.