Java & Scala: add configurable list of domains which should count as "internal" (#18)