Backports to support Java8 APIs and features in Java7