main.mk: support building with make 4.0
main.mk: allow building with openjdk7