Fix for ROOT-6924 and ROOT-6925 - Build fails with --prefix and/or -Dgnuinstall=ON