Target java version -> 1.6

Changes made to ensure binary target compatibility with java 1.6, due to
serious problems when trying to make it compatible with java 1.7.
Tested with many jdks ranging from 1.6 to 1.8 from Oracle and IBM.