Don't clobber TMPDIR during Java detection

- Java detection used TMPDIR as var to parse command output
- TMPDIR is used in libltdl later on in ./configure
- alternative fix is local var or subshell
- fixes issue introduced via #33163ee
Fix invalid preprocessor macro names

- PACKAGE_NAME and PACKAGE_VERSION seem to be lost in time and space
- required for homebrew to work on OSX