fix logic for LEGACY_USE_JAVA6

Signed-off-by: Brandon McAnsh <brandonm@matricom.net>