Fix up the casting so we use the right code depending on which Boost filesystem we have