- Move OSX specific linker switches to PLATFORM_LDFLAGS.
- Make JAVA_HOME overridable on the commandline.