improved OSX jvm auto-detection