workaround for JDK 1.8: code rewritten to ensure that references to JDK 1.7/1.8 classes won't be added to class-files when compiled under JDK 1.8 with target=1.6, thus making it possible to run external build using JDK 1.6/1.7