ISPN-5024 Fix build problem in IDEs

This is an attempt to fix problems mentioned in https://github.com/infinispan/infinispan/pull/3112