Support java 1.6

Signed-off-by: Andrey Shamis <lolnik@gmail.com>