make sure compiler specified in ./configure is used. Fixes ROOT-5818.