Revert "update detection of modules (fix enesim.pc with static modules)"

This reverts commit 16ec24ff82396779023eafdbc33cd1d99ead91c2.