Baker-Akhiezer functions and generalised Macdonald-Mehta integrals