Action-based distribution function modelling for constraining the shape of the Galactic dark matter halo