Add Apache Commons Math to the build for optimisation routines.