Exploiting Composite Functions in Bayesian Optimization