Use function as objective of JuMP

ASTInterpreter2 is not a dependency of either package. This is probably related to Juno. See ERROR: Unsatisfiable requirements detected for package ASTInterpreter2 [e6d88f4b].