Revert "Don't use civi functions during installation!"

needs review...

This reverts commit 96c43dfdda37cba373cd46cb31e7843fcc62ac20.