Fix interface detection

Especially when interfaces may not be available
on the classpath.