Prefer interface to implementation in type declaration

This fixes the build failure with JDK 8