Fix Math::median() function for non-float types
Fix Math::median() function for non-float types

Should also fix compilation error for dwi2mask on MacOSX, as reported in
issue #75.

MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3