Makefile: fix JAVA_HOME detection

Use readlink and sed to detect JAVA_HOME and also fix CXXFLAGS.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Merge pull request #5 from yegorich/java-home

Makefile: fix JAVA_HOME detection
Add SocketCAN headers

Add SocketCAN headers to enable build on older Linux systems and
remove obsolete define checks.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Merge pull request #6 from yegorich/headers

Add SocketCAN headers